<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="css/styles.css"></link>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Listado de Amigos</title>
<link href="../stylesheets/front.css" media="screen, projection"
	rel="stylesheet" type="text/css" />
</head>

<c:url var="addJugadorUrl" value="/jugadores/agregar.html" />
<c:url var="listaAmigosUrl" value="/jugadores/listarAmigos.html" />
<c:url var="listaHistorialDonacionUrl"
	value="/jugadores/historialDonacion.html" />
<style type="text/css" title="currentStyle">
@import "../css/demo_page.css";

@import "../css/demo_table_jui.css";

@import "../css/jquery-ui-1.8.4.custom.css";
</style>
<script type="text/javascript" language="javascript"
	src="../js/jquery.js"></script>
<script type="text/javascript" language="javascript"
	src="../js/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#example').dataTable({
			"sScrollY" : 500,
			"bJQueryUI" : true,
			"bFilter" : false,
			"sPaginationType" : "full_numbers"
		});
	});
</script>
<body>
<form:form modelAttribute="jugador" method="POST"
	action="${listaAmigosUrl}">
	<fieldset id="signin_menu" style="width: 70%;
	" aling="center"><legend style="">
	<h2>Agregar Amigos</h2>
	</legend>
	<div id="demo" style="background: white;"><c:if
		test="${!empty listAmigos}">
		<table cellpadding="0" cellspacing="0" border="0" class="display"
			id="example">
			<thead>
				<tr>
					<th>Seleccionar</th>
					<th>Amigo</th>
					<th>Imagen</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<th>Seleccionar</th>
					<th>Amigo</th>
					<th>Imagen</th>
				</tr>
			</tfoot>
			<tbody>
				<c:forEach items="${listAmigos}" var="amigo">
					<tr class="odd gradeA">
						<td><input name="flagEmail" type="checkbox"
							value="${amigo.email}" /></td>
						<td><c:out value="${amigo.username}" /></td>
						<td><a href="#"> <c:out value="${amigo.email}" /> </a></td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</c:if> <c:if test="${empty listAmigos}">
	No existen Amigos
</c:if></div>
	<br />
	<br />
	<input type="submit" value="Invitar" id="signin_submit" /></fieldset>
</form:form>
</body>
</html>